import request from '@/utils/request'

// 查询出勤天数列表
export function listAttendance(query) {
  return request({
    url: '/sl/attendance/list',
    method: 'get',
    params: query
  })
}

// 查询出勤天数详细
export function getAttendance(attendanceId) {
  return request({
    url: '/sl/attendance/' + attendanceId,
    method: 'get'
  })
}

// 新增出勤天数
export function addAttendance(data) {
  return request({
    url: '/sl/attendance',
    method: 'post',
    data: data
  })
}

// 修改出勤天数
export function updateAttendance(data) {
  return request({
    url: '/sl/attendance',
    method: 'put',
    data: data
  })
}

// 删除出勤天数
export function delAttendance(attendanceId) {
  return request({
    url: '/sl/attendance/' + attendanceId,
    method: 'delete'
  })
}

// 查询所有出勤天数
export function allAttendance(data) {
  return request({
    url: '/sl/attendance/all',
    method: 'post',
    data: data
  })
}

// 修改出勤天数list
export function updateAttendanceList(data) {
  return request({
    url: '/sl/attendance/upal',
    method: 'put',
    data: data
  })
}
